package GUI;

import java.awt.Graphics;

import javax.swing.JPanel;

public class BChart extends JPanel{

	
	private int startXPoint;
	private int startYPoint;
	private int height;
	private int width;
	
	

public int getStartXPoint() {
		return startXPoint;
	}

	public void setStartXPoint(int startXPoint) {
		this.startXPoint = startXPoint;
	}

	public int getStartYPoint() {
		return startYPoint;
	}

	public void setStartYPoint(int startYPoint) {
		this.startYPoint = startYPoint;
	}

	public int getBarHeigt() {
		return height;
	}

	public void setBarHeigt(int height) {
		this.height = height;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}
public void setValues(int X, int Y, int height, int width){
	
	startXPoint=X;
	startYPoint=Y;
	this.height=height;
	this.width=width;	
	
}
public void paintComponent(Graphics g){
		
			this.setSize(500, 500);
			System.out.println(height);	
			g.fillRect(startXPoint, startYPoint, height, width);
			
			g.drawLine(startXPoint, startYPoint, startXPoint, startYPoint+height);
			g.drawLine(startXPoint, startYPoint, startXPoint+width,startYPoint);
			g.drawLine(startXPoint, startYPoint+height,  startXPoint+width, startYPoint+height);
			g.drawLine(startXPoint+width, startYPoint, startXPoint+width, startYPoint+height);
	
	
}
}
